﻿@using NetCoreCMS.Core.Modules.Setup.Models.ViewModels
@model SetupViewModel

@{    
    Title = "";
    Layout = "_SimpleLayout";
}

<div class="page-header text-center">
    <h1>NetCoreCMS Setup</h1>
</div>
<p class="lead text-center">This is the NetCoreCMS Setup Page. Please fill the following information and press submit to complete the setup process.</p>
@*<hr />*@
<form class="form-horizontal" asp-controller="SetupHome" asp-action="Index" method="post">
    <span asp-validation-summary="ValidationSummary.All" class="text-danger"></span>
            
    <div class="form-group">
        <label class="control-label col-sm-2" for="Database" >Database:</label>
        <div class="col-sm-10">
            <select asp-for="Database" type="text" class="form-control" id="Database" name="Database">
                <option value="">Select your database engine</option>
                @*<option value="SqLite">SQLite</option>
                <option value="MSSQL">MSSQL</option>*@
                <option value="MySql">MySql</option>
                @*<option value="MsSqlLocalStorage">MsSqlLocalStorage</option>
                <option value="PgSql">PgSql</option>*@
            </select>
            <span asp-validation-for="Database" class="text-danger"></span>
        </div>
    </div>
    <div id="databaseInfo" class="DatabaseInfo">
        <hr />
        <div class="form-group">
            <label class="control-label col-sm-2" for="DatabaseHost">Database Host:</label>
            <div class="col-sm-10">
                <input asp-for="DatabaseHost" type="text" class="form-control" id="DatabaseHost" name="DatabaseHost" placeholder="Enter Database Host" value="localhost">
                <span asp-validation-for="DatabaseHost" class="text-danger"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-2" for="DatabasePort">Database Port:</label>
            <div class="col-sm-10">
                <input asp-for="DatabasePort" type="text" class="form-control" id="DatabasePort" name="DatabasePort" placeholder="Enter Database Port" value="3306">
                <span asp-validation-for="DatabasePort" class="text-danger"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-2" for="DatabaseUserName">Database UserName:</label>
            <div class="col-sm-10">
                <input asp-for="DatabaseUserName" type="text" class="form-control" id="DatabaseUserName" name="DatabaseUserName" placeholder="Enter Database UserName" value="root">
                <span asp-validation-for="DatabaseUserName" class="text-danger"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-2" for="DatabasePassword">Database Password:</label>
            <div class="col-sm-10">
                <input asp-for="DatabasePassword" type="text" class="form-control" id="DatabasePassword" name="DatabasePassword" placeholder="Enter Database Password">
                <span asp-validation-for="DatabasePassword" class="text-danger"></span>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-sm-2" for="DatabaseName">Database Name:</label>
            <div class="col-sm-10">
                <input asp-for="DatabaseName" type="text" class="form-control" id="DatabaseName" name="DatabaseName" placeholder="Enter Database Name" value="netcore_cms">
                <span asp-validation-for="DatabaseName" class="text-danger"></span>
            </div>
        </div>   
        <div class="form-group">
            <label class="control-label col-sm-2" for="TablePrefix">Table Prefix:</label>
            <div class="col-sm-10">
                <input asp-for="TablePrefix" type="text" class="form-control" placeholder="Enter table Prefix" value="ncc_">
                <span asp-validation-for="TablePrefix" class="text-danger"></span>
            </div>
        </div> 
        <hr />
    </div>
                   
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-primary">Submit</button>
            <button type="reset" class="btn btn-default">Clear</button>
        </div>
    </div>
</form>
    
